import sun.misc.BASE64Decoder;

response.addHeader("Pragma","public")
response.addHeader("Expires","0")
response.addHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0")
response.addHeader("Content-Type","application/force-download")
response.addHeader("Content-type","application/vnd.ms-excel")
response.addHeader("Content-Disposition","attachment;filename=export.xls")
def context = request.getParameter('context')
BASE64Decoder decoder = new BASE64Decoder()
try {  
    byte[] b = decoder.decodeBuffer(context)
    response.getOutputStream().write(b)
} catch (Exception e) {	
	 println(e)
}